/* 主页index.html的样式表 */

/* 顶部导航条的容器 */
.topbar-wrapper{
    /* 设置宽度全屏 */
    width: 100%;
    /* 设置高度和行高 */
    height: 40px;
    line-height: 40px;
    /* 设置背景颜色 */
    background-color: #333;
}

/* 设置超链接的颜色 */
.topbar a{
    display: block;
    font-size: 12px;
    color: #b0b0b0;
}

.topbar a:hover{
    color: white;
}

/* 设立中间分割线 */
.topbar .line{
    font-size: 12px;
    color: #424242;
    margin: 0 8px;
}

/* 设置左侧导航栏 */
.service, .topbar li{
    float: left;
}

.app{
    position: relative;
}

/* 设置app下的小三角 */
li:hover > .app::before{
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-top: none;
    border-bottom-color: #fff;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
}

li:hover>.app .qrcode{
    /* display: block; */
    height: 148px;
    z-index: 9999;
}

.app .qrcode{
    /* display: none; */
    position: absolute;
    width: 124px;
    height: 0px;
    overflow: hidden;
    line-height: 1;
    text-align: center;
    background-color: #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    left: -40px;
    /* transition 用于为样式设置过渡效果 */
    transition: height 300ms;
    z-index: 9999;
}

.app .qrcode img{
    width: 90px;
    margin: 17px 17px;
}

.app .qrcode span{
    font-size: 14px;
    color: #000;
}

/* 设置右侧导航栏 */
.shop-cart, .user-info{
    float: right;
}

.topbar .shop-cart a{
    position: relative;
    width: 120px;
    height: 40px;
    margin-left: 15px;
    text-align: center;
    background-color: #424242;
}

.shop-cart:hover a{
    background-color: #fff;
    color: #ff6700;
}

.shop-cart a .shopmessage{
    height: 0;
    overflow: hidden;
    z-index: 9999;
}

.shop-cart:hover a .shopmessage{
    /* display: block; */
    position: absolute;
    right: 0;
    width: 316px;
    height: 100px;
    background-color: #fff;
    box-shadow: -5px 0 5px -3px rgba(0, 0, 0, 0.2);
    transition: height 300ms;

    /* 新增 Flexbox 居中 */
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center;    /* 垂直居中 */
    color: #000;
    z-index: 9999;
}

.shop-cart i{
    margin-right: 2px;
}

.header-wrapper{
    position: relative;
}

/* 设置中间的header */
.header-wrapper .header{
    height: 100px;
}

.header-wrapper .header .logo{
    float: left;
    margin-top: 22.5px;
}

.header-wrapper>.header>.nav-wrapper{
    float: left;
    margin-left: 7px;
}

.header-wrapper>.header>.nav-wrapper>.nav{
    /* width: 850px; */
    height: 90px;
    line-height: 90px;
    padding-left: 58px;
}

.nav > li{
    float: left;
}

.all-goods-wrapper{
    position: relative;
}

/* 设置左侧导航栏的样式 */
.left-manu{
    width: 234px;
    height: 440px;
    background-color: rgba(0, 0, 0, 0.6);
    position: absolute;
    z-index: 999;
    left: -120px;
    line-height: 1;
    padding-top: 20px;
}

.left-manu li a{
    display: block;
    height: 42px;
    line-height: 42px;
    color: white;
    padding: 0 30px;
    font-size: 14px;
}

.left-manu li a:hover{
    color: white;
    background-color: #FF6700;
}

.left-manu a i{
    float: right;
    line-height: 42px;
    font-size: 20px;
}

.nav-wrapper>.nav>li>a{
    position: relative;
    display: block;
    color: black;
    font-size: 16px;
    margin-top: 10px;
    margin-right: 20px;
}

.nav-wrapper>.nav>li>a:hover{
    color: #ff6700;
}

.all-goods{ 
    visibility: hidden;
}

.nav .goods-info{
    height: 0;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    transition: height 300ms;
    background-color: #fff;
}

.nav .show-goods:hover ~ .goods-info, .goods-info:hover{
    height: 228px;
    border-top: 1px solid rgb(224, 224, 224);
    box-shadow: 0 5px 3px rgba(0, 0, 0, 0.2);
    z-index: 9999;
}

.search-wrapper{
    width: 296px;
    height: 50px;
    float: right;
    background-color: red;
    margin-top: 25px;
    border: 1px solid rgb(224, 224, 224);
}

.search-wrapper .search-inp{
    border: none;
    float: left;
    padding: 0;
    width: 228px;
    height: 50px;
    padding-left: 8px;
    padding-right: 8px;
    font-size: 16px;
}

.search-wrapper .search-inp:focus{
    outline: 1px solid orange;
}

.search-wrapper .search-inp:focus ~ .search-btn{
    outline: 1px solid orange;
}

.search-wrapper .search-btn{
    float: left;
    width: 52px;
    height: 50px;
    padding: 0;
    border: none;
    background-color: #fff;
    color: #616161;
    font-size: 18px;
    border-left: 1px solid rgb(224, 224, 224);
}

.search-wrapper .search-btn:hover{
    background-color: orange;
    color: #fff;
}


/* banner 样式 */
.banner{
    position: relative;
    height: 460px;
}

.banner .img-list li{
    position: absolute;
}
.banner img{ 
    width: 1226px;
    vertical-align: top;
}

/* 设置3个导航点 */
.pointer{
    position: absolute;
    bottom: 22px;
    right: 35px;
}

.pointer a{
    float: left;
    width: 6px;
    height: 6px;
    border: 2px rgba(255, 255, 255, 0.4) solid;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.4);
    margin-left: 6px;
}

.pointer a:hover,
.pointer a.active{
    border-color: rgba(0, 0, 0, 0.4);
    background-color: white;
}

/* 设置banner的两个箭头 */
.prev-next a{
    width: 41px;
    height: 69px;
    background-image: url("../img/icon-slides.png");
    /* background-color: red; */
    position: absolute;
    top: 0;
    bottom: 0;
    margin: auto 0;
}

.prev-next .prev{
    left: 234px;
    background-position: -84px 0;
}

.prev-next .prev:hover{
    left: 234px;
    background-position: 0 0;
}

.prev-next .next{
    right: 0;
    background-position: -125px 0;
}

.prev-next .next:hover{
    right: 0;
    background-position: -42px 0;
}

/* 设置回到顶部 */
.back-top{
    width: 26px;
    height: 26px;
    background-color: orange;
    /* 开启固定定位 */
    position: fixed;

    bottom: 250px;
    right: 50%; /* 将right值设置为视口宽度的50% */

    margin-right: -639px;
    /*
        布局的等式
            left + margin-left + width + margin-right + right = 视口的宽度

            auto + 0 + 26 + 0 + 60 = 视口的宽度

            auto + 0 + 26 + 0 + 50% = 视口的宽度
    */
}